package com.kingsoft.demo.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBUtil {

	
	public static Connection getConnection(){
		
		Connection conn = null;
	
		try{
			
			Class.forName("com.mysql.jdbc.Driver");			
			String url ="jdbc:mysql://localhost:3306/fsdb";
			String user = "root";
			String password = "admin";
			conn = DriverManager.getConnection(url, user, password);
			
		}catch (Exception e) {
			e.printStackTrace();
		}

		return conn;
		
	}
}
